package org.swim.web.utils;

public class FormHelper {
	public static String getHiddenInput(String name, String value, String id){
		StringBuilder sb = new StringBuilder("<input");
		sb.append(" type=\"hidden\"");
		sb.append(" name=\"").append(name).append("\"");
		sb.append(" value=\"").append(value).append("\"");
		if(id!=null && !id.equals(""))
			sb.append(" id=\"").append(id).append("\"");
		sb.append(" />");
		return sb.toString();
	}
	
	public static String getHiddenInput(String name, String value){
		return getHiddenInput(name, value, null);
	}
}
